<div class="new_bd clearfix">
        <div class="new_list">
        	<?php echo $this->render('bulletin/left.phtml');?>
        </div>
        <!-- 主栏 -->
        <div class="new_mn">
        	<b class="spbg2 corner tl"></b>
    		<b class="spbg2 corner tr"></b>
    		<b class="spbg2 corner bl"></b>
    		<b class="spbg2 corner br"></b>
    		<div class="titlebar clearfix"><a href="<?php echo MY_URL;?>">Home</a> &gt; Comments</div>
    		<h1 class="commenttitle">Those who shopped at newjerseysoccer say:</h1>
    		<ul class="bulletinlist-comment clearfix">
    			<?foreach($this->itemArray as $value):?>
	    			<li class="clearfix">
	    				<div class="time"><strong><?=CString::maskUid($value['username'])?></strong> [<?=date('Y-m-d H:i:s',$value['addtime'])?>]</div>
	    				<div class="title"><?=$value['content']?></div>
	    				<?php if($value['reply']!=''):?>
	    				<div class="reply"><h2>Reply of newjerseysoccer Customer Service:</h2><?=$value['reply']?></div>
	    				<?php endif;?>
	    				<?php if($this->member_type=="administrator"):?>
	    				<div><textarea style="width:600px;height:50px;"></textarea></div>
	    				<div><input class="replyBtn" commentId="<?php echo $value['suggestion_id'];?>" type="button" value="Reply" /></div>
	    				<?php endif;?>
	    			</li>
    			<?endforeach;?>
    		</ul>
    		<div class="pages clearfix">
    			<div class="g-pages-style">
    			<?php echo $this->pageString;?>
    				
    			</div>
    		</div>
    		<div style="margin:10px;"><div class="fb-comments" data-href="http://www.newjerseysoccer.net" data-width="700" data-num-posts="50"></div></div>
        </div>
    </div>
    <?php if($this->member_type=="administrator"):?>
    <script>
    	$('.replyBtn').click(function(){
    		var _commentId = $(this).attr('commentId');
    		var _reply = $(this).parent().prev().find('textarea').val();
    		$.ajax({
				type: "POST",
				url: "/administrator-comments-reply?id="+_commentId+"&reply="+_reply,
				success: function(data) {	
					if(data==1){
						window.location.reload();
					}
				}			
			});
    	});
    </script>
    <?php endif;?>
